//
//  UIButton+Extension.swift
//  swiftweibo
//
//  Created by Apple on 15/11/30.
//  Copyright © 2015年 tzw. All rights reserved.
//

import UIKit


extension UIButton{
    convenience init(imageName: String,title: String,color: UIColor,sizeFont: CGFloat){
        self.init()
        // 设置图片
        self.setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        // 设置文字
        self.setTitle(title, forState: UIControlState.Normal)
        // 设置文字的颜色
        self.setTitleColor(color , forState: UIControlState.Normal)
        // 设置文字的大小
        self.titleLabel?.font = UIFont.systemFontOfSize(sizeFont)
    }
    
}


